import requests

class ApiIhrmLogin(object):
    def __init__(self):
        pass

    def login(self, login_json_data):
        url = "https://ihrm-test.itheima.net/api/sys/login"
        # 使用了json属性，就不用加请求头了，会自动序列化请求体类型的
        header = {"Content-Type": "application/json"}
        return requests.post(url=url, json=login_json_data)



# 自己的单模块测试
if __name__ == '__main__':
    data = {"mobile": "13800000002", "password": "123456"}
    resp = ApiIhrmLogin().login(data)
    print(resp.text)


